#ifndef SNAILIOTMONITORINGSERVER_H
#define SNAILIOTMONITORINGSERVER_H

#include <QCoreApplication>
#include <QTcpServer>
#include <QTcpSocket>
#include <QList>
#include <QDebug>
class SnailIOTMonitoringServer : public QTcpServer
{
    Q_OBJECT
public:
    explicit SnailIOTMonitoringServer(QObject *parent = nullptr);
protected:
    void incomingConnection(qintptr socketDescriptor) override;
signals:
private:
    QList<QTcpSocket*> clients;
    void sendDataToClient(QTcpSocket *client, const QByteArray &data);
    // 广播数据给所有客户端
    void broadcastData(const QByteArray &data);


};

#endif // SNAILIOTMONITORINGSERVER_H
